import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const state = {
    domain: 'http://47.95.113.136/project/public/index.php/',
    mapDomain: 'http://47.95.113.136/map.html',
    qrCodeDomain: 'http://47.95.113.136/qrcode_download_app.png',
    //domain: 'http://localhost/project/public/index.php/',
    users: [],
}

// 定义所需的 mutations
const mutations = {
    setUsers(state, users) {
        state.users = users
    }
}

// 创建 store 实例
export default new Vuex.Store({
    state,
    mutations
})